<?php

header('content-type:text/html; charset=utf8');
header('Access-Control-Allow-Origin: *');   // 告诉浏览器，别拦我，谁都可以访问改接口

$server = 'localhost:3306';
$username = $password = 'root';
$dbname = 'mall123';

$conn = mysqli_connect($server, $username, $password, $dbname);

if (!$conn) {
  die('数据库连接失败');
}
